@extends('layouts.base')
@section('title', '云图库分类管理')
@section('content')
@section('admin-style')
@stop
<!-- ============================================================== -->
<!-- Container fluid  -->
<!-- ============================================================== -->
<div class="container-fluid">
    <!-- ============================================================== -->
    <!-- Bread crumb and right sidebar toggle -->
    <!-- ============================================================== -->
    <div class="row page-titles">
        <div class="col-md-5 align-self-center">
            <h3 class="text-themecolor">云图库分类管理--列表</h3>
        </div>
        <div class="col-md-7 align-self-center">
            <ol class="breadcrumb">
                <li class="breadcrumb-item"><a href="javascript:void(0)">首页</a></li>
                <li class="breadcrumb-item">云图库分类管理</li>
                <li class="breadcrumb-item active">云图库分类列表</li>
            </ol>
        </div>
    </div>
    <!-- ============================================================== -->
    <!-- End Bread crumb and right sidebar toggle -->
    <!-- ============================================================== -->

    <!-- ============================================================== -->
    <!-- Start Page Content -->
    <!-- ============================================================== -->
    <div class="row">
        <div class="col-12">
            <div class="card">
                <div class="card-body">
                    <h4 class="card-title">管理列表</h4>
                    <h6 class="card-subtitle"></h6>
                    <div class="card-body">
                        <form method="get" action="{{ route('admin.cloudimagetype.index') }}">
                            <div class="form-row">
                                <div class="col-md-3 mb-3">
                                    <label for="validationDefault04">云图库分类名称</label>
                                    <input type="text" name="cloudimagesName" autocomplete="off" class="form-control" placeholder="云图库分类名称">
                                </div>
                            </div>
                            <button class="btn btn-primary" type="submit">筛选</button>
                            <a href="{{ route('admin.cloudimagetype.index') }}" class="btn btn-info">重置</a>
                        </form>
                        <a class="btn btn-success float-right" href="{{ route('admin.cloudimagetype.created') }}"><i class="fas fa-plus"></i> 添加</a>
                    </div>
                    <div class="table-responsive">
                    <style>.table td, .table th {padding: 0.6rem;vertical-align: top;border-top: 1px solid #dee2e6;}</style>
                        <table id="demo-foo-addrow" class="table table-bordered m-t-30 table-hover contact-list" data-paging="true" data-paging-size="7">
                            <thead>
                            <tr>
                                <th>序号</th>
                                <th>分类名称</th>
                                <th>添加时间</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            @foreach($result as $k=>$item)
                                <tr>
                                    <td>{{$k+1}}</td>
                                    <td>{{ $item->cloudimagesname}}</td>
                                    <td>{{ $item->created_at}}</td>
                                    <td>
                                        <a class="btn btn-success float-right" href="{{ route('admin.cloudimagetype.edit', ['cloudimagetype' => $item->id]) }}"><i class="fas fa-edit"></i> 修改云图库类别名称</a> 
                                    </td>
                                </tr>
                            @endforeach
                            </tbody>
                        </table>
                    </div>
                </div>
                <div class="row">
                    <div class="col-sm-12 col-md-4"><div class="dataTables_info" id="example_info" role="status" aria-live="polite"></div></div>
                    <div class="col-sm-12 col-md-8">
                        <div class="dataTables_paginate paging_simple_numbers" id="example_paginate">
                            {{$result->appends([
                                'goodsName' => request()->goodsName
                            ])->links('layouts.pagination')}}
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

@stop

@section('admin-js')
    
<script type="text/javascript">

    function del(){
    
    }
      $(".isDel").click(function(){
          urls = $(this).attr("actionstr");

          swal({
              title: "您确定要删除吗?",
              icon: "warning",
              buttons: ['取消', '确定'],
              dangerMode: true,
          })
              .then((willDelete) => {
                  if (willDelete) {
                      $('#deleteForm').attr('action',urls);
                      $('#deleteForm').submit();
                  } else {

                  }
              });
      })
</script>

@stop
